import 'package:flutter/material.dart';
import 'package:cookbook_v2/containers/AlignWidget.dart';
import 'package:cookbook_v2/containers/CenterWidget.dart';
import 'package:cookbook_v2/containers/ContainerWidget.dart';
import 'package:cookbook_v2/containers/PaddingWidget.dart';

class ContainersPage extends StatelessWidget {
  const ContainersPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('容器类Widget'),
      ),
      body: ListView(
        children: <Widget>[
          GestureDetector(
            child: const ListTile(
              title: Text('Padding'),
            ),
            onTap: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => const PaddingWidget()));
            },
          ),
          GestureDetector(
            child: const ListTile(
              title: Text('Container'),
            ),
            onTap: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => const ContainerWidget()));
            },
          ),
          GestureDetector(
            child: const ListTile(
              title: Text('Align'),
            ),
            onTap: () {
              Navigator.push(context,
                  MaterialPageRoute(builder: (context) => const AlignWidget()));
            },
          ),
          GestureDetector(
            child: const ListTile(
              title: Text('Center'),
            ),
            onTap: () {
              Navigator.push(
                  context,
                  MaterialPageRoute(
                      builder: (context) => const CenterWidget()));
            },
          )
        ],
      ),
    );
  }
}
